﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;
using DataFileApplication_WPF.ViewModels;

namespace DataFileApplication_WPF.Views
{
    /// <summary>
    /// AddArrayTreeItemView.xaml 的交互逻辑
    /// </summary>
    public partial class AddArrayTreeItemView : Window
    {

        AddArrayTreeItemViewModel addArrayTreeItemViewModel = new AddArrayTreeItemViewModel();
        public AddArrayTreeItemView()
        {
            InitializeComponent();
            addArrayTreeItemViewModel.ArrayLength = 1; //默认数组长度为1
            this.DataContext = addArrayTreeItemViewModel;

        }

        private void ButtonOK_Click(object sender, RoutedEventArgs e)
        {
            ////判断名称
            //if (string.IsNullOrEmpty(this.NewName.Text))
            //{
            //    MessageBox.Show("名称不允许为空！请检查！");
            //    return;
            //}
           
            this.DialogResult = true;
            this.Close();
        }

        private void ButtonCancel_Click(object sender, RoutedEventArgs e)
        {
            this.DialogResult = false;
            this.Close();
        }
    }
}
